home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Productivity Pak 2 / rerun-productivity-pak-ii.d64 / 1650 autodial (.txt) next >
Commodore BASIC  |  2022-09-20  |  4KB  |  155 lines

  1. 10 rem ********************************
  2. 20 rem ******** 1650 autodial *********
  3. 30 rem ********************************
  4. 40 rem ************* by ***************
  5. 50 rem ********************************
  6. 60 rem ******** david bradley *********
  7. 70 rem ********************************
  8. 80 :
  9. 90 :
  10. 100 rem     *********************
  11. 110 rem     *** variable list ***
  12. 120 rem     *********************
  13. 130 :
  14. 140 rem ab  = abort check
  15. 150 rem ab$ = abort get
  16. 160 rem b1  = pulse phone
  17. 170 rem b2  = ready modem
  18. 180 rem d   = length of input
  19. 190 rem d$  = number to dial input
  20. 200 rem g$  = yes/no
  21. 210 rem i   = misc counting
  22. 220 rem l   = sound routine counter
  23. 230 rem n   = number of pulses
  24. 240 rem n$  = used to break up d$
  25. 250 rem n1  = count pulses
  26. 260 rem na  = number of attempts
  27. 270 rem s   = sid reference value
  28. 280 rem sa  = delay for carrier detect
  29. 290 rem sd  = false carrier
  30. 300 rem t   = time delay/pulse length
  31. 310 rem ti  = built in clock
  32. 320 rem x   = counting
  33. 330 rem xx  = time delay
  34. 340 :
  35. 350 rem     *************
  36. 360 rem     *** setup ***
  37. 370 rem     *************
  38. 380 :
  39. 390 poke53280,0:poke53281,0:print"[147]":printchr$(14):printchr$(8)
  40. 400 rem open15,8,15,"s0:1650":save"1650",8:verify"1650",8
  41. 410 b1=56577:b2=56579
  42. 420 na=1
  43. 430 poke b2,32
  44. 440 poke b1,0
  45. 450 :
  46. 460 rem     *************
  47. 470 rem     *** start ***
  48. 480 rem     *************
  49. 490 :
  50. 500 print"     1650 [193][213][212][207][196][201][193][204][197][210] [194][217] [196][193][214][201][196] [194][210][193][196][204][197][217]"
  51. 510 print"     --------------------------------"
  52. 520 print"[205]ove [212]-[196] [211]witch [212]o [196]ata"
  53. 530 print"([208]ress [210][197][212][213][210][206] [212]o [209]uit)"
  54. 540 print"[212]o [193]bort [196]ialing [207]peration [208]ress [193]ny [203]ey"
  55. 550 print"                  [193]nd [215]ait              "
  56. 560 print"[197]nter [206]umber [212]o [196]ial*[157][157][157]";
  57. 570 input d$
  58. 580 fori=1tolen(d$)
  59. 590 ifmid$(d$,i,1)="-"then640
  60. 600 ifmid$(d$,i,1)="*"then640
  61. 610 ifasc(mid$(d$,i,1))>57then650
  62. 620 ifasc(mid$(d$,i,1))<48then650
  63. 630 nexti
  64. 640 goto660
  65. 650 print"[197]rror [201]n [206]umber [201]nput...[210]e-[197]nter":xx=1000:gosub1540:goto390
  66. 660 ifd$="*"thenprint"[209]uit? ([217]/[206])            ":goto680
  67. 670 goto720
  68. 680 get g$
  69. 690 if g$=""then680
  70. 700 if g$="y"thenprint"[147]":end:print"[195]ont [206][207][212] [193]llowed":g$="y":goto700
  71. 710 goto390
  72. 720 iflen(d$)<7then750
  73. 730 iflen(d$)>15then810
  74. 740 goto850
  75. 750 print"";d$;" [201]s [204]ess [212]han 7 [196]igits!":xx=500:gosub1540
  76. 760 print"[196]ial [193]nyway?"
  77. 770 getg$
  78. 780 ifg$=""then770
  79. 790 ifg$<>"y"thenprint"[147]":goto390
  80. 800 goto850
  81. 810 print"";d$;" [201]s [193] [194]it [204]ong       ":xx=500:gosub1540
  82. 820 print"[196]ial [193]nyway?"
  83. 830 getg$:ifg$=""then830
  84. 840 ifg$<>"y"thenprint"[147]":goto390
  85. 850 poke b1,32
  86. 860 t=1000
  87. 870 t=t-1:ift<>0 goto870
  88. 880 print"[196]ialing ";d$; " [193]ttempt [206]umber";na
  89. 890 print"              [145][145]"
  90. 900 d=len(d$)
  91. 910 forx=1tod
  92. 920 getab$:ifab$<>""thenab=1
  93. 930 n$=mid$(d$,x,1)
  94. 940 ifn$="-"thengoto980
  95. 950 n=val(n$)
  96. 960 ifn=0thenn=10
  97. 970 gosub1080
  98. 980 nextx
  99. 990 print
  100. 1000 print "[196]ial [195]omplete!             "
  101. 1010 ifab=1thenab=0:goto390
  102. 1020 xx=5000:gosub1540
  103. 1030 ifpeek(b1)<>127thengoto1190
  104. 1040 getab$:ifab$<>""thenab=1
  105. 1050 ifab=1thenab=0:goto390
  106. 1060 t=t+1:ift>1000thent=0:pokeb1,0:xx=1000:gosub1540:na=na+1:goto850
  107. 1070 goto1030
  108. 1080 forn1=1ton
  109. 1090 pokeb1,0
  110. 1100 t=6
  111. 1110 t=t-1:ift<>0then1110
  112. 1120 pokeb1,32
  113. 1130 t=4
  114. 1140 t=t-1:ift<>0then1140
  115. 1150 next n1
  116. 1160 t=70
  117. 1170 t=t-1:ift<>0then1170
  118. 1180 return
  119. 1190 sd=0:sa=ti
  120. 1200 ifti-sa<60then1220
  121. 1210 goto1240
  122. 1220 ifpeek(b1)<>127thensd=1
  123. 1230 goto1200
  124. 1240 ifsd=0thenprint"[194]usy!":pokeb1,0:xx=1000 gosub1540:goto760
  125. 1250 gosub 1340
  126. 1260 print"[215]e [200]ave [193] [195]onnection!"
  127. 1270 print"[204]oading [210][213][206][212][197][210][205] [208][204][213][211]"
  128. 1280 load"runterm plus",8
  129. 1290 :
  130. 1300 rem *****************************
  131. 1310 rem *** alarm/bell subroutine ***
  132. 1320 rem *****************************
  133. 1330 :
  134. 1340 s=54272
  135. 1350 forl=0to24
  136. 1360 pokes+l,0
  137. 1370 nextl
  138. 1380 poke s+1,100
  139. 1390 poke s+5,10
  140. 1400 poke s+15,255
  141. 1410 poke s+24,15
  142. 1420 poke s+4,21
  143. 1430 xx=500:gosub1540
  144. 1440 pokes+24,0
  145. 1450 forl=0to24
  146. 1460 pokes+l,0
  147. 1470 nextl
  148. 1480 return
  149. 1490 :
  150. 1500 rem *****************************
  151. 1510 rem *** time delay subroutine ***
  152. 1520 rem *****************************
  153. 1530 :
  154. 1540 fori=1toxx:nexti:return
  155.